<div class="HelpDiv">
	<div class="HelpDivHead">
		<div class="HelpTitle">前端方法</div>
		<div class="HelpMenu">
		  <div><a href="#Public">公共方法</a></div>
		  <div><a href="#DataBase">访问数据库</a></div>
		</div>
	</div>

	<div class="HelpBody">
		<div>
			<div id="Public" class="HelpBodyBig">公共方法</div>
			<div class="HelpBodyMiddle">依赖“BaseFunction”模块</div>
			<br>

			<div class="HelpBodyMiddle">request(url, isReturnArray, parameter, sucHandle, errHandle)，请求本地服务</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">url</div>
				<div>api地址</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">isReturnArray</div>
				<div>是否返回数组</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">parameter</div>
				<div>请求参数</div>
			</div>
			<div class="HelpBodySmall">
				<div>sucHandle(data)</div>
				<div>执行成功回调方法，有默认处理（不处理）</div>
			</div>
			<div class="HelpBodySmall">
				<div>errHandle(err)</div>
				<div>执行失败回调方法，有默认处理（弹出错误对话框）</div>
			</div>
			<div class="HelpBodyMiddle">httpRequest(url, parameter, sucHandle, errHandle)，请求别的服务器服务</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">url</div>
				<div>api地址</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">parameter</div>
				<div>请求参数</div>
			</div>
			<div class="HelpBodySmall">
				<div>sucHandle(data)</div>
				<div>执行成功回调方法，有默认处理（不处理）</div>
			</div>
			<div class="HelpBodySmall">
				<div>errHandle(err)</div>
				<div>执行失败回调方法，有默认处理（弹出错误对话框）</div>
			</div>
			<div class="HelpBodyMiddle">clientDownloadFile(fileName, sucHandle, errHandle)，下载本服务器文件</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">fileName</div>
				<div>文件全名</div>
			</div>
			<div class="HelpBodySmall">
				<div>sucHandle(data)</div>
				<div>执行成功回调方法，有默认处理（不处理）</div>
			</div>
			<div class="HelpBodySmall">
				<div>errHandle(err)</div>
				<div>执行失败回调方法，有默认处理（弹出错误对话框）</div>
			</div>
			<div class="HelpBodyMiddle">responseFun(res, sucHandle, errHandle)，返回结果默认处理</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">res</div>
				<div>返回结果（{Error: err, Data: data}），如果Error有值，执行errHandle，否则执行sucHandle</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">sucHandle(data)</div>
				<div>执行成功回调方法，有默认处理（不处理）</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">errHandle(err)</div>
				<div>执行失败回调方法，有默认处理（弹出错误对话框）</div>
			</div>
			<div class="HelpBodyMiddle">successFun(data)，执行成功回调默认方法</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">data</div>
				<div>返回结果</div>
			</div>
			<div class="HelpBodyMiddle">errFun(err)，执行失败回调默认方法</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">err</div>
				<div>返回的错误数据</div>
			</div>
			<div class="HelpBodyMiddle">loading(isDisplay)，是否弹出Loadding画面，锁屏，一定要对称使用，有显示一定要有隐藏，不然界面不能操作</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">isDisplay</div>
				<div>是否显示</div>
			</div>
			<div class="HelpBodyMiddle">confirm(msg, title)，弹出确认对话框（屏幕中间显示）</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">msg</div>
				<div>显示消息内容</div>
			</div>
			<div class="HelpBodySmall">
				<div>title</div>
				<div>对话框标题</div>
			</div>
			<div class="HelpBodyMiddle">alert(msg, title)，警告对话框（屏幕中间显示）</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">msg</div>
				<div>显示消息内容</div>
			</div>
			<div class="HelpBodySmall">
				<div>title</div>
				<div>对话框标题</div>
			</div>
			<div class="HelpBodyMiddle">tip(msg, title)，提示对话框（底部显示）</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">msg</div>
				<div>显示消息内容</div>
			</div>
			<div class="HelpBodySmall">
				<div>title</div>
				<div>对话框标题</div>
			</div>
			<div class="HelpBodyMiddle">stringToDateTime(strDateTime, dateFormat)，将字符串转换为日期时间格式</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">strDateTime</div>
				<div>时间字符串</div>
			</div>
			<div class="HelpBodySmall">
				<div>dateFormat</div>
				<div>
					转换格式，枚举值，类型：BaseEnum.DateTimeFormat：<br>
					BaseEnum.DateTimeFormat.Date，日期格式<br>
					BaseEnum.DateTimeFormat.DateTime（默认值），日期时间格式
				</div>
			</div>
			<div class="HelpBodyMiddle">dateTimeToString(dateTime, dateFormat)，将时间转换为字符串</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">dateTime</div>
				<div>日期时间</div>
			</div>
			<div class="HelpBodySmall">
				<div>dateFormat</div>
				<div>
					转换格式，枚举值，类型：BaseEnum.DateTimeFormat：<br>
					BaseEnum.DateTimeFormat.Date，日期格式<br>
					BaseEnum.DateTimeFormat.DateTime（默认值），日期时间格式
				</div>
			</div>
			<div class="HelpBodyMiddle">getMonthDays(dateTime)，获取当前月有多少天</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">dateTime</div>
				<div>日期时间</div>
			</div>
			<div class="HelpBodyMiddle">percentToNumber(val)，将百分比数据转换为数值</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">val</div>
				<div>百分比字符串</div>
			</div>
			<div class="HelpBodyMiddle">getSelectText(element)，获取文本框被选择的文本以及光标位置</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">element</div>
				<div>Dom元素</div>
			</div>
		</div>

		<br>
		<div>
			<div id="DataBase" class="HelpBodyBig">访问数据库方法</div>
			<div class="HelpBodyMiddle">依赖“EntityService”模块，需身份验证才能正确执行，都有如下两个回调方法参数：</div>
			<div class="HelpBodySmall">
				<div>sucHandle(data)</div>
				<div>执行成功回调方法，有默认处理（不处理）</div>
			</div>
			<div class="HelpBodySmall">
				<div>errHandle(err)</div>
				<div>执行失败回调方法，有默认处理（弹出错误对话框）</div>
			</div>
			<br>

			<div class="HelpBodyMiddle">save(entityName, records, successHandle, errHandle)，保存数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">records</div>
				<div>保存记录集合</div>
			</div>
			<div class="HelpBodyMiddle">saves(entityRecords, successHandle, errHandle)，批量保存多个实体数据，有事务回滚机制保护数据一致性</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityRecords</div>
				<div>
					[{<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityName: 'XXX',&nbsp;&nbsp;&nbsp;&nbsp;//实体名称<br>
		            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records: [Record]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//记录集合<br>
		            }]
		        </div>
			</div>
			<div class="HelpBodyMiddle">updateByValue(entityName, condition, value, successHandle, errHandle)，保存数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>更新条件</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">value</div>
				<div>更新值</div>
			</div>
			<div class="HelpBodyMiddle">delete(entityName, condition, successHandle, errHandle)，按条件删除数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>删除条件</div>
			</div>
			<div class="HelpBodyMiddle">deletes(entityName, conditions, successHandle, errHandle)，按多个条件批量删除记录，或的关系</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>conditions</div>
				<div>删除条件集合</div>
			</div>
			<div class="HelpBodyMiddle">deleteById(entityName, id, successHandle, errHandle)，按_id删除记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">id</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodyMiddle">deleteByIds(entityName, ids, successHandle, errHandle)，按_id集合删除数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">ids</div>
				<div>[Record._id]</div>
			</div>
			<div class="HelpBodyMiddle">find(entityName, condition, orderBy, populate, successHandle, errHandle)，按条件查找数据</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>orderBy</div>
				<div>排序条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">findById(entityName, id, populate, successHandle, errHandle)，按_id查找记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">id</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodySmall">
				<div>populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">findOne(entityName, condition, populate, successHandle, errHandle)，按条件查找一条记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodyMiddle">search(entityName, text, condition, limit, successHandle, errHandle)，全文检索记录，本查询需开启数据库全文检索功能</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">text</div>
				<div>需要检索的文本</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">condition</div>
				<div>过滤条件，例如：{Code: 'XXX'}</div>
			</div>
			<div class="HelpBodySmall">
				<div>limit</div>
				<div>返回限制条数</div>
			</div>
			<div class="HelpBodyMiddle">pageQuery(entityName, condition, orderBy, populate, pageNum, pageSize, successHandle, errHandle)，按页查找记录</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>orderBy</div>
				<div>排序条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>populate</div>
				<div>展开子实体条件</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">pageNum</div>
				<div>页号，页索引从0开始</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">pageSize</div>
				<div>每页记录条数</div>
			</div>
			<div class="HelpBodyMiddle">queryRecordCount(entityName, condition, successHandle, errHandle)，按条件查找记录条数</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodyMiddle">findRecordIndex(entityName, id, condition, orderBy, successHandle, errHandle)，按条件查找记录在实体表中的索引位置，主要用于卡片翻页功能</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">entityName</div>
				<div>实体名称</div>
			</div>
			<div class="HelpBodySmall">
				<div class="HelpNotEmpty">id</div>
				<div>Record._id</div>
			</div>
			<div class="HelpBodySmall">
				<div>condition</div>
				<div>查找条件</div>
			</div>
			<div class="HelpBodySmall">
				<div>orderBy</div>
				<div>排序条件</div>
			</div>
		</div>
	</div>
</div>